package ch.nostromo.tiffanys.tests.problems;

import ch.nostromo.tiffanys.game.GameController;
import ch.nostromo.tiffanys.game.GameControllerException;
import ch.nostromo.tiffanys.game.game.GameState;
import ch.nostromo.tiffanys.game.player.PlayerEngine;
import ch.nostromo.tiffanys.tests.TestBase;

public class TestPerformance extends TestBase {

  public void testPerformance() throws ClassNotFoundException, GameControllerException {
    PlayerEngine white = this.getEngineWithFixedDepth(4);
    PlayerEngine black = this.getEngineWithFixedDepth(4);
    
   String fenInput = "r2qk2r/ppp2ppp/2n2n2/2bppb2/2BPPB2/2N2N2/PPP2PPP/R2Q1RK1 b kq - 0 6";
  //  String fenInput = "2Q5/6r1/8/p1kNK3/P6p/8/7P/8 b - - 0 53";
   // String fenInput = "1k1rr3/ppp2p2/6pp/3p1q2/8/Q1N2n2/PP3P1P/2KB1R1R w - - 0 26";
   //  fenInput = "r2qk2r/ppp1n1pp/2nbpp2/3p4/3P2b1/2NQBN2/PPP1PPPP/3RKB1R w Kkq - 0 7";
    
     fenInput = "2kr3r/pppbbpp1/2n2q1p/1N1pp3/3PP3/3B1N2/PPP1KPPP/1R1Q2R1 w - - 0 12";
   
   //  fenInput = "rnbqk1nr/pppp1pbp/6p1/8/3NP3/2N5/PPP2PPP/R1BQKB1R b KQkq - 0 5";
     
     
    GameController gc = new GameController(white, black, fenInput);

    gc.computeNextMoveNow(true);

    
    GameState gs = gc.getCurrentGameState();
    
    assertTrue(gs.blackMates());
  }
  
}
